// Header Protection
#ifndef _GALLEON_H_
#define _GALLEON_H_

// Include Files
#include "IE\Definitions.h"
#include "Systems\ScriptNode.h"

/////////////////////////////////////////////////////////////////////////////////////
// TODO
class CGalleon : public IE::CScriptNode
{
public:     // methods
	CGalleon();
	~CGalleon();

	//// TODO: it will obviously be a problem to have to overload new in every 
	////     dynamically allocated class which uses a vector or matrix, I will have to 
	////     do something about this for sure... 
	//// TEMP: overloading new in every dynamically allocated class that uses __m128
	//// LATER: overload new globally to take in an alignment
	//// AWESOME: memory manager automatically knows to align it
	//void *operator new( size_t _uiBytes )
	//{
	//	// allocate memory with some extra
	//	byte_t *pUnaligned = (byte_t *)malloc( _uiBytes + 16 );

	//	// move the pointer over at least one and align it
	//	byte_t *pAligned = pUnaligned + (16 - uint_t(pUnaligned) % 16);

	//	// add the offset into the previous byte
	//	pAligned[-1] = byte_t(pAligned - pUnaligned);

	//	// return the aligned memory
	//	return pAligned;
	//}

	//void operator delete( void *pAligned )
	//{
	//	// find the amount this pointer was offset for alignment
	//	byte_t uiOffset = ((byte_t *)pAligned)[-1];

	//	// move the pointer
	//	byte_t *pUnaligned = (byte_t *)pAligned - uiOffset;

	//	// free the memory
	//	free(pUnaligned);
	//}

//private:    // event handlers
//	void OnCreate( CEventArg &_rArg );
//	void OnDestroy( CEventArg &_rArg );
//	void OnUpdate( CEventArg &_rArg );

//private:    // data members
//	//float_t       m_fElapsed;
//	//matrix_t      m_matTransform;

private:    // dummy definitions
	CGalleon( CGalleon const & );
	CGalleon &operator =( CGalleon const & );
};

// Header Protection
#endif // _GALLEON_H_
